package API.DAY4.file;

import java.io.File;

public class ListFilesDemo2 {
    public static void main(String[] args) {
         File files = new File(".");
         if(files.isDirectory()){
             File[] list = files.listFiles(f->f.getName().startsWith("."));
             for(File file:list){
                 System.out.println(file);
             }
         }else {
             System.out.println("不是目录");
         }
    }
}
